import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home'
import World from '@/views/World'
import SideBar from '@/views/side-bar'
import LeftList from '@/components/left-list'
import RightList from '@/components/right-list'
// 组件测试
import DemoPullDownMenu from '@/demoviews/demo-pull-down-menu'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home,
      
    },
    {
      path: '/sidebar',
      name: 'sidebar',
      component: SideBar,
      children: [
        {
          path: 'list/detail',
          components: {
            default:LeftList,
            detail:RightList
          }
        }
      ] 
    },
    {
      path: '/world',
      name: 'World',
      component: World
    },
    {
      path: '/demoPullDownMenu',
      name: 'DemoPullDownMenu',
    
      component: DemoPullDownMenu
    },
    {
      path: '*',
      name: 'Home',
      component: Home
    }
  
  ]
})
